# Maintainer: Alexey Pavlov <alexpux@gmail.com>

_realname=Params-Util
pkgname=perl-${_realname}
pkgver=1.07
pkgrel=1
pkgdesc="Simple, compact and correct param-checking functions"
arch=('i686' 'x86_64')
url="https://metacpan.org/release/Params-Util"
groups=('perl-modules')
depends=('perl')
license=('GPL' 'PerlArtistic')
source=("https://search.cpan.org/CPAN/authors/id/A/AD/ADAMK/Params-Util-${pkgver}.tar.gz"
        01-msysize.patch)
sha256sums=('30f1ec3f2cf9ff66ae96f973333f23c5f558915bb6266881eac7423f52d7c76c'
            '0cf95e252716dbaddb96916a945a82e5c10fe5bb0ff4451fe8299b15d5cbe017')

prepare() {
  cd "${srcdir}/${_realname}-${pkgver}"
  patch -p1 -i ${srcdir}/01-msysize.patch
}

build() {
  cd "${srcdir}/${_realname}-${pkgver}"
  unset PERL5LIB PERL_MM_OPT
  PERL_MM_USE_DEFAULT=1 PERL_AUTOINSTALL=--skipdeps \
  perl Makefile.PL INSTALLDIRS=vendor
  make
}

package() {
  cd "${srcdir}/${_realname}-${pkgver}"
  make install DESTDIR="${pkgdir}"
}
